import math
import sys
import io
import FileIO
import Probability
import Post
import Parser

ORIGINAL_FILE_PATH = "F:\Users\Seph\Datasets\StackOverflowCompetition\\testingWithCloseData.csv"
NEW_TEST_FILE_PATH = "F:\Users\Seph\Datasets\StackOverflowCompetition\\testingWithoutCloseData.csv"

def main():
	originalFileStream = FileIO.openFile(ORIGINAL_FILE_PATH, FileIO.READ_MODE)
	newFileStream = FileIO.openFile(NEW_TEST_FILE_PATH, FileIO.WRITE_MODE)
	
	while (not Parser.isEndOfFile(originalFileStream)):
		post = Parser.readPost(originalFileStream)
		newFileStream.write(post.toTestLine())
	
if __name__=="__main__":
    main()